package com.itheima.dao;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.itheima.pojo.Role;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface RoleDao {
    public Set<Role> findByUserId(Integer userId);

    public List<Role> findByCondition(String queryString);

    public List<Role> findAll();

    public void add(Role role);

    public void setRoleAndMenu(Map<String, Integer> map);

    public void setRoleAndPermission(Map<String, Integer> map);

    public Role findById(Integer roleId);

    public Integer[] findMenuIdsByRoleId(Integer roleId);

    public Integer[] findPermissionIdsByRoleId(Integer roleId);

    public void edit(Role role);

    public void deleteById(Integer roleId);

    public void deleteRoleAndMenuRelation(Integer roleId);

    public void deleteRoleAndPermissionRelation(Integer roleId);
}
